import { http } from "@/utils/http";

export const getLogin = (data) => {
  return http.request("post", "/api/auth/login", { data });
};

// 顶层大楼总能耗统计
export const getBuildingES = (data) => {
  return http.request("get", "/api/bscreen/home/building_energy_statistics?baseDay=" + data?.baseDay);
};

// 顶层大楼功率电流
export const getBuildingPowerOrCurrent = (data) => {
  return http.request(
    "get",
    "/api/bscreen/home/power_or_current_statistics?mode=" +
      data?.mode +
      "&baseDay=" +
      data?.baseDay
  );
};

// 顶层大楼监控能耗
export const getBuildingMonitor = (data) => {
  return http.request(
    "get",
    "/api/bscreen/home/monitor_energy?mode=" +
      data?.mode +
      "&baseTime=" +
      data?.baseTime
  );
};

// 顶层大楼电能曲线(电能趋势)
export const getBuildingEnergyTrend = (data) => {
  return http.request(
    "get",
    "/api/bscreen/home/energy_trend?baseDay=" + data?.baseDay
  );
};
